package com.legal.controller.practice;


import com.legal.domain.dto.PracticeSubmissionDTO;
import com.legal.domain.entity.UserAnswer;
import com.legal.domain.po.PracticeDetail;
import com.legal.domain.po.PracticeRecord;
import com.legal.domain.po.Question;
import com.legal.domain.result.Result;
import com.legal.service.practice.IQuestionService;
import com.legal.service.practice.IUserPracticeStatsService;
import com.legal.service.practice.PracticeService;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.math.BigDecimal;
import java.time.Duration;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * <p>
 * 刷题功能模块 - 刷题管理 控制器
 * </p>
 *
 * @author xiaopeng
 * @since 2025-06-27
 */
@RestController
@RequestMapping("/practice")
@RequiredArgsConstructor
@Tag(name = "刷题管理")  // OpenAPI 3.0 注解
public class PracticeController {


    private final PracticeService practiceService;

    /**
     * 提交刷题
     *
     * @param submission
     * @return
     */
    @PostMapping("/submit")
    public Result<Void> submitPractice(@RequestBody PracticeSubmissionDTO submission) {

        return practiceService.submitPractice(submission);

    }


}











